#ifndef CUSTOMPUSHBUTTON_H
#define CUSTOMPUSHBUTTON_H

#include "devcommon_global.h"

#include <QWidget>
#include <QPushButton>


/**
 * @brief 自定义按钮  正常没有背景悬停有背景
 */
class DEVCOMMONSHARED_EXPORT CustomPushbutton : public QWidget
{
    Q_OBJECT
public:
    explicit CustomPushbutton(QWidget *parent = nullptr);

    // 设置图标
    void setIcon(QIcon icon);
    void setText(QString string);
    QFont getButtonFont();

    // 鼠标事件
    void enterEvent(QEvent *);
    void leaveEvent(QEvent *);

signals:
    void clicked();

private:
    QPushButton        *m_button;
};

#endif // CUSTOMPUSHBUTTON_H
